package com.bdqn.business.academic.controller;

import com.bdqn.aop.Log;
import com.bdqn.business.academic.service.AskService;
import com.bdqn.entity.academic.Ask;
import com.bdqn.response.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/ask")
public class AskController {

    @Autowired
    private AskService askService;


    @Log("获取问答题列表")
    @RequestMapping(value = "/getList",method = RequestMethod.POST)
    public Result getList(@RequestBody Map<String,Object> map){
        return askService.getList(map);
    }

    @Log("保存问答题")
    @RequestMapping(value = "/saveAsk",method = RequestMethod.POST)
    public Result saveAsk(@RequestBody Ask ask){
        return askService.saveAsk(ask);
    }
}
